
# 3.循环结构
# imp:循环一定要注意退出循环的条件  避免造成卡死

# for循环
#   range    range(5)  0-4 的序列
#            range(2,5)  2-4 的序列
#            range(2,7,2)  2 4 6
# for i in range(2,7,2):
#     print(i)
#     j = 2*i
#     print(j)
# print("Final I:",i)

# while循环
# a = 1
# b = 5
# while a<b:
#     a = a+1
#     if a==3:
#         continue
#     print(a)
#     print("hello while")
#     if a==5:
#         break



# 循环嵌套
# for i in range(5):
#     print("I:",i)
#     for j in range(3):
#         print("J:",j)

# tips: switch python中没有！！！！